<?php

namespace app\api\controller\common;

use app\api\model\common\BannerModel;
use app\common\controller\Api;

class Banner extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * Notes: banner 展示
     * User: 浪子膏
     * Date: 2023/10/21 13:53
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public function list()
    {

        $list =  BannerModel::order('weigh desc')
            ->where('category_id',$this->getLangCategoryId())->select();
        $this->dataOk($list);
    }
}